local function AT2_IsSecure()
	AT2_Print(debugstack(2, 1, 1),"debug","AT2_IsSecure")
	if (debugstack(2,1,1):find("Interface\\AddOns\\AutoTalker2\\")) then
		return true
	else
		return false
	end
end

local function AT2_Modules_Init()
	if (AT2_IsSecure()) then
		for name,mod in pairs(AT2_ModulesT()) do
			if (AT2_Save["Modules"]["name"]["Enabled"]) then
				if (mod["OnLoad"]) then mod["OnLoad"]() end
				if mod["Events"] then
					for Event,Frame in pairs(mod["Events"]) do
						if not(Event=="OnUpdate") then
							AT2_UI2_AddEvent(Frame,Event,function(Frame, UIEvent, ...) mod:OnEvent(Frame, Event, ...) end)
						end
					end
				end
				if mod["Save"] then
					AT2_Save["Mod: "..name]=mod["Save"]
				end
				if (mod["RegisterForSend"]) then AT2_Modules_RegisterForSend(mod) end
			end
		end
	end
end